package gov.chinatax.ctcps.generator.dao.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CZDZ_DZB"
 *     
*/
public class CzdzDzb implements Serializable {

    /** identifier field */
    private String bh;

    /** persistent field */
    private String dwbh;

    /** persistent field */
    private String nd;

    /** persistent field */
    private BigDecimal yf;

    /** persistent field */
    private String sbztDm;

    /** persistent field */
    private String hzztDm;

    /** persistent field */
    private String hdztDm;

    /** nullable persistent field */
    private String sx;

    /** full constructor */
    public CzdzDzb(String bh, String dwbh, String nd, BigDecimal yf, String sbztDm, String hzztDm, String hdztDm, String sx) {
        this.bh = bh;
        this.dwbh = dwbh;
        this.nd = nd;
        this.yf = yf;
        this.sbztDm = sbztDm;
        this.hzztDm = hzztDm;
        this.hdztDm = hdztDm;
        this.sx = sx;
    }

    /** default constructor */
    public CzdzDzb() {
    }

    /** minimal constructor */
    public CzdzDzb(String bh, String dwbh, String nd, BigDecimal yf, String sbztDm, String hzztDm, String hdztDm) {
        this.bh = bh;
        this.dwbh = dwbh;
        this.nd = nd;
        this.yf = yf;
        this.sbztDm = sbztDm;
        this.hzztDm = hzztDm;
        this.hdztDm = hdztDm;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="BH"
     *         
     */
    public String getBh() {
        return this.bh;
    }

    public void setBh(String bh) {
        this.bh = bh;
    }

    /** 
     *            @hibernate.property
     *             column="DWBH"
     *             length="50"
     *             not-null="true"
     *         
     */
    public String getDwbh() {
        return this.dwbh;
    }

    public void setDwbh(String dwbh) {
        this.dwbh = dwbh;
    }

    /** 
     *            @hibernate.property
     *             column="ND"
     *             length="4"
     *             not-null="true"
     *         
     */
    public String getNd() {
        return this.nd;
    }

    public void setNd(String nd) {
        this.nd = nd;
    }

    /** 
     *            @hibernate.property
     *             column="YF"
     *             length="38"
     *             not-null="true"
     *         
     */
    public BigDecimal getYf() {
        return this.yf;
    }

    public void setYf(BigDecimal yf) {
        this.yf = yf;
    }

    /** 
     *            @hibernate.property
     *             column="SBZT_DM"
     *             length="2"
     *             not-null="true"
     *         
     */
    public String getSbztDm() {
        return this.sbztDm;
    }

    public void setSbztDm(String sbztDm) {
        this.sbztDm = sbztDm;
    }

    /** 
     *            @hibernate.property
     *             column="HZZT_DM"
     *             length="2"
     *             not-null="true"
     *         
     */
    public String getHzztDm() {
        return this.hzztDm;
    }

    public void setHzztDm(String hzztDm) {
        this.hzztDm = hzztDm;
    }

    /** 
     *            @hibernate.property
     *             column="HDZT_DM"
     *             length="2"
     *             not-null="true"
     *         
     */
    public String getHdztDm() {
        return this.hdztDm;
    }

    public void setHdztDm(String hdztDm) {
        this.hdztDm = hdztDm;
    }

    /** 
     *            @hibernate.property
     *             column="SX"
     *             length="10"
     *         
     */
    public String getSx() {
        return this.sx;
    }

    public void setSx(String sx) {
        this.sx = sx;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("bh", getBh())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CzdzDzb) ) return false;
        CzdzDzb castOther = (CzdzDzb) other;
        return new EqualsBuilder()
            .append(this.getBh(), castOther.getBh())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getBh())
            .toHashCode();
    }

}
